<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            background-clip: content-box;
            /* 内边距不占内容 */
        }

        body {
            width: 100vw;
        }

        .box {
            width: 50%;
            height: 500px;
            border: 2px solid #ddd;
            margin: 50px auto;
        }

        .content {
            display: flex;
        }

        /* 透视 */
        .content div {
            width: 100px;
            height: 100px;
            background-color: red;
            padding: 15px;
            border: 5px solid #ddd;
            transition: 1s;
            transform: perspective(600px) rotateY(60deg);
            transform-style: preserve-3d;
        }

        .content div:hover {
            /* transform: rotateX(180deg); */
            transform: perspective(600px) rotateY(60deg) scale3d(1.5, 1.5, 4);
        }
    </style>
</head>
<div class="box">

    <div class="content">
        <div>2</div>
        <div>2</div>
    </div>
</div>

<body>

</body>

</html>